home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / SocketServices.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  24.1 KB  |  795 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        SocketServices.a
  3. ;
  4. ;    Contains:    This file contains constants and data structures that
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1994-1997 by Apple Computer, Inc. All rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__SOCKETSERVICES__') = 'UNDEFINED' THEN
  19. __SOCKETSERVICES__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  25.     include 'MixedMode.a'
  26.     ENDIF
  27.  
  28.  
  29. ;  ///////////////////////////////////////////////////////////////////////////////////////
  30. ;      TypeDefs for the Socket Services function codes
  31.  
  32.  
  33.  
  34. ; typedef Byte                             SS_BYTE
  35.  
  36. ; typedef Byte                             SS_FLAGS8
  37.  
  38. ; typedef Byte                             SS_IRQ
  39.  
  40. ; typedef Byte                             SS_PWRLEVEL
  41.  
  42. ; typedef UInt16                         SS_ADAPTER
  43.  
  44. ; typedef UInt16                         SS_BCD
  45.  
  46. ; typedef UInt16                         SS_COUNT
  47.  
  48. ; typedef UInt16                         SS_EDC
  49.  
  50. ; typedef UInt16                         SS_FLAGS16
  51.  
  52. ; typedef UInt16                         SS_PAGE
  53.  
  54. ; typedef UInt16                         SS_PWRINDEX
  55.  
  56. ; typedef UInt16                         SS_SIGNATURE
  57.  
  58. ; typedef UInt16                         SS_SKTBITS
  59.  
  60. ; typedef UInt16                         SS_SOCKET
  61.  
  62. ; typedef UInt16                         SS_SPEED
  63.  
  64. ; typedef UInt16                         SS_WINDOW
  65.  
  66. ; typedef UInt16                         SS_WORD
  67.  
  68. ; typedef UInt32                         SS_BASE
  69.  
  70. ; typedef UInt32                         SS_FLAGS32
  71.  
  72. ; typedef UInt32                         SS_OFFSET
  73.  
  74. ; typedef UInt32                         SS_SIZE
  75.  
  76. ; typedef Ptr                             SS_PTR
  77.  
  78. ; typedef OSErr                         SS_RETCODE
  79.  
  80. SS_SCHARTBL                RECORD 0
  81. sktCaps                     ds.w    1                ; offset: $0 (0)        ;     SS_FLAGS16
  82. activeHigh                 ds.l    1                ; offset: $2 (2)        ;     SS_FLAGS32
  83. activeLow                 ds.l    1                ; offset: $6 (6)        ;     SS_FLAGS32
  84. sizeof                     EQU *                    ; size:   $A (10)
  85.                         ENDR
  86. SS_SISTRUCT                RECORD 0
  87. bufferLength             ds.w    1                ; offset: $0 (0)        ;     SS_WORD
  88. dataLength                 ds.w    1                ; offset: $2 (2)        ;     SS_WORD
  89. charTable                 ds        SS_SCHARTBL        ; offset: $4 (4)        ;     SS_FLAGS16
  90. sizeof                     EQU *                    ; size:   $E (14)
  91.                         ENDR
  92.  
  93. STR_SIZE                        EQU        24
  94. ;  minimum string length
  95. SS_VISTRUCT                RECORD 0
  96. bufferLength             ds.w    1                ; offset: $0 (0)        ;     SS_WORD
  97. dataLength                 ds.w    1                ; offset: $2 (2)        ;     SS_WORD
  98. szImplementor             ds.b    1                ; offset: $4 (4) <-- really an array of length one ;     SS_WORD
  99. padding                     ds.b    1                ; offset: $5 (5) <-- really an array of length one ;     
  100. sizeof                     EQU *                    ; size:   $6 (6)
  101.                         ENDR
  102. SS_ACHARTBL                RECORD 0
  103. adpCaps                     ds.w    1                ; offset: $0 (0)        ;     SS_FLAGS16
  104. activeHigh                 ds.l    1                ; offset: $2 (2)        ;     SS_FLAGS32
  105. activeLow                 ds.l    1                ; offset: $6 (6)        ;     SS_FLAGS32
  106. sizeof                     EQU *                    ; size:   $A (10)
  107.                         ENDR
  108. SS_PWRENTRY                RECORD 0
  109. powerLevel                 ds.b    1                ; offset: $0 (0)        ;     SS_PWRLEVEL
  110. validSignals             ds.b    1                ; offset: $1 (1)        ;     SS_FLAGS8
  111. sizeof                     EQU *                    ; size:   $2 (2)
  112.                         ENDR
  113. SS_AISTRUCT                RECORD 0
  114. bufferLength             ds.w    1                ; offset: $0 (0)        ;     SS_WORD
  115. dataLength                 ds.w    1                ; offset: $2 (2)        ;     SS_WORD
  116. charTable                 ds        SS_ACHARTBL        ; offset: $4 (4)
  117. numPwrEntries             ds.w    1                ; offset: $E (14)        ;     SS_WORD
  118. pwrEntryPtr                 ds.l    1                ; offset: $10 (16)
  119. sizeof                     EQU *                    ; size:   $14 (20)
  120.                         ENDR
  121. SS_MEMWINTBL            RECORD 0
  122. memWndCaps                 ds.w    1                ; offset: $0 (0)        ;     SS_FLAGS16
  123. firstByte                 ds.l    1                ; offset: $2 (2)        ;     SS_BASE
  124. lastByte                 ds.l    1                ; offset: $6 (6)        ;     SS_BASE
  125. minSize                     ds.l    1                ; offset: $A (10)        ;     SS_SIZE
  126. maxSize                     ds.l    1                ; offset: $E (14)        ;     SS_SIZE
  127. reqGran                     ds.l    1                ; offset: $12 (18)        ;     SS_SIZE
  128. reqBase                     ds.l    1                ; offset: $16 (22)        ;     SS_SIZE
  129. reqOffset                 ds.l    1                ; offset: $1A (26)        ;     SS_SIZE
  130. slowest                     ds.w    1                ; offset: $1E (30)        ;     SS_SPEED
  131. fastest                     ds.w    1                ; offset: $20 (32)        ;     SS_SPEED
  132. sizeof                     EQU *                    ; size:   $22 (34)
  133.                         ENDR
  134. SS_IOWINTBL                RECORD 0
  135. ioWndCaps                 ds.w    1                ; offset: $0 (0)        ;     SS_FLAGS16
  136. firstByte                 ds.l    1                ; offset: $2 (2)        ;     SS_BASE
  137. lastByte                 ds.l    1                ; offset: $6 (6)        ;     SS_BASE
  138. minSize                     ds.l    1                ; offset: $A (10)        ;     SS_SIZE
  139. maxSize                     ds.l    1                ; offset: $E (14)        ;     SS_SIZE
  140. reqGran                     ds.l    1                ; offset: $12 (18)        ;     SS_SIZE
  141. addrLines                 ds.w    1                ; offset: $16 (22)        ;     SS_COUNT
  142. eisaSlot                 ds.b    1                ; offset: $18 (24)        ;     SS_FLAGS8
  143. padding                     ds.b    1                ; offset: $19 (25) <-- really an array of length one ;     
  144. sizeof                     EQU *                    ; size:   $1A (26)
  145.                         ENDR
  146. SS_WISTRUCT                RECORD 0
  147. bufferLength             ds.w    1                ; offset: $0 (0)        ;     SS_WORD
  148. dataLength                 ds.w    1                ; offset: $2 (2)        ;     SS_WORD
  149. numTblEntries             ds.w    1                ; offset: $4 (4)        ;     SS_WORD
  150. memWinTbl                 ds        SS_MEMWINTBL    ; offset: $6 (6)
  151. ioWinTbl                 ds        SS_IOWINTBL        ; offset: $28 (40)
  152. sizeof                     EQU *                    ; size:   $42 (66)
  153.                         ENDR
  154.  
  155. ; ————————————————————————————————————————————————————————————————————————
  156. ;    function selectors passed to Socket Service entry point
  157. ;————————————————————————————————————————————————————————————————————————
  158.  
  159.  
  160. fnSSGetAdapterCount                EQU        $80
  161. fnSSUnsupported81                EQU        $81
  162. fnSSUnsupported82                EQU        $82
  163. fnSSGetSSInfo                    EQU        $83
  164. fnSSInquireAdapter                EQU        $84
  165. fnSSGetAdapter                    EQU        $85
  166. fnSSSetAdapter                    EQU        $86
  167. fnSSInquireWindow                EQU        $87
  168. fnSSGetWindow                    EQU        $88
  169. fnSSSetWindow                    EQU        $89
  170. fnSSGetPage                        EQU        $8A
  171. fnSSSetPage                        EQU        $8B
  172. fnSSInquireSocket                EQU        $8C
  173. fnSSGetSocket                    EQU        $8D
  174. fnSSSetSocket                    EQU        $8E
  175. fnSSGetStatus                    EQU        $8F
  176. fnSSResetSocket                    EQU        $90
  177. fnSSUnsupported91                EQU        $91
  178. fnSSUnsupported92                EQU        $92
  179. fnSSUnsupported93                EQU        $93
  180. fnSSUnsupported94                EQU        $94
  181. fnSSInquireEDC                    EQU        $95
  182. fnSSGetEDC                        EQU        $96
  183. fnSSSetEDC                        EQU        $97
  184. fnSSStartEDC                    EQU        $98
  185. fnSSPauseEDC                    EQU        $99
  186. fnSSResumeEDC                    EQU        $9A
  187. fnSSStopEDC                        EQU        $9B
  188. fnSSReadEDC                        EQU        $9C
  189. fnSSGetVendorInfo                EQU        $9D
  190. fnSSAcknowledgeInterrupt        EQU        $9E
  191. fnSSGetSetPriorHandler            EQU        $9F
  192. fnSSGetSetSSAddr                EQU        $A0
  193. fnSSGetAccessOffsets            EQU        $A1
  194. fnSSUnsupportedA2                EQU        $A2
  195. fnSSUnsupportedA3                EQU        $A3
  196. fnSSUnsupportedA4                EQU        $A4
  197. fnSSUnsupportedA5                EQU        $A5
  198. fnSSUnsupportedA6                EQU        $A6
  199. fnSSUnsupportedA7                EQU        $A7
  200. fnSSUnsupportedA8                EQU        $A8
  201. fnSSUnsupportedA9                EQU        $A9
  202. fnSSUnsupportedAA                EQU        $AA
  203. fnSSUnsupportedAB                EQU        $AB
  204. fnSSUnsupportedAC                EQU        $AC
  205. fnSSUnsupportedAD                EQU        $AD
  206. fnSSVendorSpecific                EQU        $AE
  207. ;     SSVendorSpecificPB.function values
  208.  
  209.  
  210. fnVSReserved                    EQU        $00
  211. fnVSGetSocketLocationIcon        EQU        $01
  212. fnVSGetSocketLocationText        EQU        $02
  213. fnVSDoSocketLocalization        EQU        $03
  214. fnVSAppleSocketCapabilities        EQU        $04
  215. fnVSSleepWakeNotification        EQU        $05
  216.  
  217. ; ————————————————————————————————————————————————————————————————————————
  218. ;    defines for the Socket Services function codes
  219. ;————————————————————————————————————————————————————————————————————————
  220.  
  221.  
  222. AC_IND                            EQU        1                    ; adapter characteristics
  223. AC_PWR                            EQU        2
  224. AC_DBW                            EQU        4
  225.  
  226. AS_POWERDOWN                    EQU        1
  227. AS_MAINTAIN                        EQU        2
  228.  
  229. EC_UNI                            EQU        1
  230. EC_BI                            EQU        2
  231. EC_REGISTER                        EQU        4
  232. EC_MEMORY                        EQU        8
  233. EC_PAUSABLE                        EQU        16
  234. EC_WRITE                        EQU        16
  235.  
  236. ET_CHECK8                        EQU        1
  237. ET_SDLC16                        EQU        2
  238.  
  239. IF_MEMORY                        EQU        1
  240. IF_IO                            EQU        2
  241.  
  242. IRQ_HIGH                        EQU        64
  243. IRQ_ENABLE                        EQU        128
  244.  
  245. IRQ_MEMORY                        EQU        4
  246. IRQ_IO                            EQU        4
  247.  
  248. PS_ATTRIBUTE                    EQU        $01
  249. PS_ENABLED                        EQU        $02
  250. PS_WP                            EQU        $04
  251.  
  252. PWR_VCC                            EQU        128                    ; Power pins in PwrEntry elements
  253. PWR_VPP1                        EQU        64
  254. PWR_VPP2                        EQU        32
  255.  
  256. SBM_WP                            EQU        1
  257. SBM_LOCKED                        EQU        2
  258. SBM_EJECT                        EQU        4
  259. SBM_INSERT                        EQU        8
  260. SBM_BVD1                        EQU        16
  261. SBM_BVD2                        EQU        32
  262. SBM_RDYBSY                        EQU        64
  263. SBM_CD                            EQU        128
  264.  
  265. SBM_LOCK                        EQU        16
  266. SBM_BATT                        EQU        32
  267. SBM_BUSY                        EQU        64
  268. SBM_XIP                            EQU        128
  269. ;  Vendor Specific Apple Socket Capabilities 
  270.  
  271. SBM_SLEEP_PWR                    EQU        1
  272.  
  273. WC_COMMON                        EQU        1
  274. WC_IO                            EQU        2
  275. WC_ATTRIBUTE                    EQU        4
  276. WC_TYPE_MASK                    EQU        7
  277. WC_WAIT                            EQU        128
  278.  
  279. WC_BASE                            EQU        1
  280. WC_SIZE                            EQU        2
  281. WC_WENABLE                        EQU        4
  282. WC_8BIT                            EQU        8
  283. WC_16BIT                        EQU        16
  284. WC_BALIGN                        EQU        32
  285. WC_POW2                            EQU        64
  286. WC_CALIGN                        EQU        128
  287. WC_PAVAIL                        EQU        256
  288. WC_PSHARED                        EQU        512
  289. WC_PENABLE                        EQU        1024
  290. WC_WP                            EQU        2048
  291.  
  292. WC_INPACK                        EQU        128
  293. WC_EISA                            EQU        256
  294. WC_CENABLE                        EQU        512
  295.  
  296. WS_IO                            EQU        1
  297. WS_ENABLED                        EQU        2
  298. WS_16BIT                        EQU        4
  299.  
  300. WS_PAGED                        EQU        8
  301. WS_EISA                            EQU        16
  302. WS_CENABLE                        EQU        32
  303. WS_SWAP_LITTLE_TO_BIG_ENDIAN    EQU        64
  304.  
  305. SS_SIG_VALUE                    EQU        $5353                ; 'SS'
  306.  
  307. SS_CMPL_1_00                    EQU        $0100                ; compliant with rev 1.0 of SS standard
  308. SS_CMPL_1_01                    EQU        $0101                ; compliant with rev 1.01 of SS standard
  309. SS_CMPL_2_00                    EQU        $0200                ; compliant with rev 2.0 of SS standard
  310. SS_CMPL_2_10                    EQU        $0210                ; compliant with rev 2.1 of SS standard
  311. ; ————————————————————————————————————————————————————————————————————————
  312. ;    Universal ProcPtr for Socket Service entry point
  313. ;————————————————————————————————————————————————————————————————————————
  314.  
  315. ; ————————————————————————————————————————————————————————————————————————
  316. ;    Card Services calls used by a Socket Service
  317. ;————————————————————————————————————————————————————————————————————————
  318.  
  319. CSEventEntryPB            RECORD 0
  320. ssHandlerID                 ds.l    1                ; offset: $0 (0)
  321. adapter                     ds.w    1                ; offset: $4 (4)
  322. socket                     ds.w    1                ; offset: $6 (6)
  323. message                     ds.w    1                ; offset: $8 (8)
  324. intrpBits                 ds.b    1                ; offset: $A (10)
  325. padding                     ds.b    1                ; offset: $B (11)
  326. sizeof                     EQU *                    ; size:   $C (12)
  327.                         ENDR
  328. ; ------------        AddSocketServices        ------------                            
  329.  
  330. AddSocketServicesPB        RECORD 0
  331. ssEntry                     ds.l    1                ; offset: $0 (0)        ;  -> given to CS for its use
  332. csEntry                     ds.l    1                ; offset: $4 (4)        ;  <- taken from CS so we know where to enter
  333. dataPtr                     ds.l    1                ; offset: $8 (8)
  334. attributes                 ds.l    1                ; offset: $C (12)
  335. numAdapters                 ds.w    1                ; offset: $10 (16)
  336. numSockets                 ds.w    1                ; offset: $12 (18)
  337. sizeof                     EQU *                    ; size:   $14 (20)
  338.                         ENDR
  339. ; ------------         ReplaceSocketServices    ------------                            
  340.  
  341. ReplaceSocketServicesPB    RECORD 0
  342. ssEntry                     ds.l    1                ; offset: $0 (0)
  343. oldSSEntry                 ds.l    1                ; offset: $4 (4)
  344. dataPtr                     ds.l    1                ; offset: $8 (8)
  345. socket                     ds.w    1                ; offset: $C (12)
  346. numSockets                 ds.w    1                ; offset: $E (14)
  347. attributes                 ds.w    1                ; offset: $10 (16)
  348. sizeof                     EQU *                    ; size:   $12 (18)
  349.                         ENDR
  350. ;
  351. ; pascal OSErr CSAddSocketServices(AddSocketServicesPB *pb)
  352. ;
  353.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  354.         Macro
  355.         _CSAddSocketServices
  356.             moveq               #80,D0
  357.             dc.w                $AAF0
  358.         EndM
  359.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  360.         IMPORT_CFM_FUNCTION CSAddSocketServices
  361.     ENDIF
  362.  
  363. ;
  364. ; pascal OSErr CSReplaceSocketServices(ReplaceSocketServicesPB *pb)
  365. ;
  366.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  367.         Macro
  368.         _CSReplaceSocketServices
  369.             moveq               #81,D0
  370.             dc.w                $AAF0
  371.         EndM
  372.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  373.         IMPORT_CFM_FUNCTION CSReplaceSocketServices
  374.     ENDIF
  375.  
  376.  
  377.  
  378. ; ————————————————————————————————————————————————————————————————————————
  379. ;    parameter blocks for each Socket Service function
  380. ;————————————————————————————————————————————————————————————————————————
  381.  
  382. SSAcknowledgeInterruptPB RECORD 0
  383. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  384. sockets                     ds.w    1                ; offset: $2 (2)        ;     SS_SKTBITS
  385. sizeof                     EQU *                    ; size:   $4 (4)
  386.                         ENDR
  387. SSGetAccessOffsetsPB    RECORD 0
  388. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  389. mode                     ds.b    1                ; offset: $2 (2)        ;     SS_BYTE
  390. reserved                 ds.b    1                ; offset: $3 (3)        ;     padding
  391. count                     ds.w    1                ; offset: $4 (4)        ;     SS_COUNT
  392. buffer                     ds.l    1                ; offset: $6 (6)        ;     SS_PTR
  393. numAvail                 ds.w    1                ; offset: $A (10)        ;     SS_COUNT
  394. sizeof                     EQU *                    ; size:   $C (12)
  395.                         ENDR
  396. SSGetAdapterCountPB        RECORD 0
  397. totalAdapters             ds.w    1                ; offset: $0 (0)        ;     SS_COUNT
  398. sig                         ds.w    1                ; offset: $2 (2)        ;     SS_SIGNATURE
  399. sizeof                     EQU *                    ; size:   $4 (4)
  400.                         ENDR
  401. SSGetSetAdapterPB        RECORD 0
  402. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  403. state                     ds.b    1                ; offset: $2 (2)        ;     SS_FLAGS8
  404. irqStatus                 ds.b    1                ; offset: $3 (3)        ;     SS_IRQ
  405. sizeof                     EQU *                    ; size:   $4 (4)
  406.                         ENDR
  407. SSGetSetEDCPB            RECORD 0
  408. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  409. edc                         ds.w    1                ; offset: $2 (2)        ;     SS_EDC
  410. socket                     ds.w    1                ; offset: $4 (4)        ;     SS_SOCKET
  411. state                     ds.b    1                ; offset: $6 (6)        ;     SS_FLAGS8
  412. edcType                     ds.b    1                ; offset: $7 (7)        ;     SS_FLAGS8
  413. sizeof                     EQU *                    ; size:   $8 (8)
  414.                         ENDR
  415. SSGetSetPagePB            RECORD 0
  416. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  417. window                     ds.w    1                ; offset: $2 (2)        ;     SS_WINDOW
  418. page                     ds.w    1                ; offset: $4 (4)        ;     SS_PAGE
  419. state                     ds.b    1                ; offset: $6 (6)        ;     SS_FLAGS8
  420. reserved                 ds.b    1                ; offset: $7 (7)        ;     padding
  421. offset                     ds.l    1                ; offset: $8 (8)        ;     SS_OFFSET
  422. sizeof                     EQU *                    ; size:   $C (12)
  423.                         ENDR
  424. SSGetSetPriorHandlerPB    RECORD 0
  425. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  426. mode                     ds.b    1                ; offset: $2 (2)        ;     SS_FLAGS8
  427. reserved                 ds.b    1                ; offset: $3 (3)        ;     padding
  428. handler                     ds.l    1                ; offset: $4 (4)        ;     SS_PTR
  429. sizeof                     EQU *                    ; size:   $8 (8)
  430.                         ENDR
  431. SSGetSetSocketPB        RECORD 0
  432. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  433. socket                     ds.w    1                ; offset: $2 (2)        ;     SS_SOCKET
  434. vccIndex                 ds.w    1                ; offset: $4 (4)        ;     SS_PWRINDEX
  435. vpp1Index                 ds.w    1                ; offset: $6 (6)        ;     SS_PWRINDEX
  436. vpp2Index                 ds.w    1                ; offset: $8 (8)        ;     SS_PWRINDEX
  437. scIntMask                 ds.b    1                ; offset: $A (10)        ;     SS_FLAGS8
  438. state                     ds.b    1                ; offset: $B (11)        ;     SS_FLAGS8
  439. ctlInd                     ds.b    1                ; offset: $C (12)        ;     SS_FLAGS8
  440. ireqRouting                 ds.b    1                ; offset: $D (13)        ;     SS_IRQ
  441. ifType                     ds.b    1                ; offset: $E (14)        ;     SS_FLAGS8
  442. padding                     ds.b    1                ; offset: $F (15) <-- really an array of length one ;     
  443. sizeof                     EQU *                    ; size:   $10 (16)
  444.                         ENDR
  445. SSGetSetSSAddrPB        RECORD 0
  446. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  447. mode                     ds.b    1                ; offset: $2 (2)        ;     SS_BYTE
  448. subfunc                     ds.b    1                ; offset: $3 (3)        ;     SS_BYTE
  449. numAddData                 ds.w    1                ; offset: $4 (4)        ;     SS_COUNT
  450. buffer                     ds.l    1                ; offset: $6 (6)        ;     SS_PTR
  451. sizeof                     EQU *                    ; size:   $A (10)
  452.                         ENDR
  453. SSGetSetWindowPB        RECORD 0
  454. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  455. window                     ds.w    1                ; offset: $2 (2)        ;     SS_WINDOW
  456. socket                     ds.w    1                ; offset: $4 (4)        ;     SS_SOCKET
  457. size                     ds.l    1                ; offset: $6 (6)        ;     SS_SIZE
  458. state                     ds.b    1                ; offset: $A (10)        ;     SS_FLAGS8
  459. reserved                 ds.b    1                ; offset: $B (11)        ;     padding
  460. speed                     ds.w    1                ; offset: $C (12)        ;     SS_SPEED
  461. base                     ds.l    1                ; offset: $E (14)        ;     SS_BASE
  462. sizeof                     EQU *                    ; size:   $12 (18)
  463.                         ENDR
  464. SSGetSSInfoPB            RECORD 0
  465. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  466. compliance                 ds.w    1                ; offset: $2 (2)        ;     SS_BCD
  467. numAdapters                 ds.w    1                ; offset: $4 (4)        ;     SS_COUNT
  468. firstAdapter             ds.w    1                ; offset: $6 (6)        ;     SS_ADAPTER
  469. sizeof                     EQU *                    ; size:   $8 (8)
  470.                         ENDR
  471. SSGetStatusPB            RECORD 0
  472. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  473. socket                     ds.w    1                ; offset: $2 (2)        ;     SS_SOCKET
  474. cardState                 ds.b    1                ; offset: $4 (4)        ;     SS_FLAGS8
  475. socketState                 ds.b    1                ; offset: $5 (5)        ;     SS_FLAGS8
  476. ctlInd                     ds.b    1                ; offset: $6 (6)        ;     SS_FLAGS8
  477. ireqRouting                 ds.b    1                ; offset: $7 (7)        ;     SS_IRQ
  478. ifType                     ds.b    1                ; offset: $8 (8)        ;     SS_FLAGS8
  479. padding                     ds.b    1                ; offset: $9 (9) <-- really an array of length one ;     
  480. sizeof                     EQU *                    ; size:   $A (10)
  481.                         ENDR
  482. SSGetVendorInfoPB        RECORD 0
  483. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  484. vendorInfoType             ds.b    1                ; offset: $2 (2)        ;     SS_BYTE
  485. reserved                 ds.b    1                ; offset: $3 (3)        ;     padding
  486. buffer                     ds.l    1                ; offset: $4 (4)        ;     SS_PTR
  487. release                     ds.w    1                ; offset: $8 (8)        ;     SS_BCD
  488. sizeof                     EQU *                    ; size:   $A (10)
  489.                         ENDR
  490. SSInquireAdapterPB        RECORD 0
  491. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  492. buffer                     ds.l    1                ; offset: $2 (2)        ;     SS_PTR
  493. numSockets                 ds.w    1                ; offset: $6 (6)        ;     SS_COUNT
  494. numWindows                 ds.w    1                ; offset: $8 (8)        ;     SS_COUNT
  495. numEDCs                     ds.w    1                ; offset: $A (10)        ;     SS_COUNT
  496. sizeof                     EQU *                    ; size:   $C (12)
  497.                         ENDR
  498. SSInquireEDCPB            RECORD 0
  499. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  500. edc                         ds.w    1                ; offset: $2 (2)        ;     SS_EDC
  501. sockets                     ds.w    1                ; offset: $4 (4)        ;     SS_SKTBITS
  502. caps                     ds.b    1                ; offset: $6 (6)        ;     SS_FLAGS8
  503. types                     ds.b    1                ; offset: $7 (7)        ;     SS_FLAGS8
  504. sizeof                     EQU *                    ; size:   $8 (8)
  505.                         ENDR
  506. SSInquireSocketPB        RECORD 0
  507. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  508. socket                     ds.w    1                ; offset: $2 (2)        ;     SS_SOCKET
  509. buffer                     ds.l    1                ; offset: $4 (4)        ;     SS_PTR
  510. scIntCaps                 ds.b    1                ; offset: $8 (8)        ;     SS_FLAGS8
  511. scRptCaps                 ds.b    1                ; offset: $9 (9)        ;     SS_FLAGS8
  512. ctlIndCaps                 ds.b    1                ; offset: $A (10)        ;     SS_FLAGS8
  513. padding                     ds.b    1                ; offset: $B (11) <-- really an array of length one ;     
  514. sizeof                     EQU *                    ; size:   $C (12)
  515.                         ENDR
  516. SSInquireWindowPB        RECORD 0
  517. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  518. window                     ds.w    1                ; offset: $2 (2)        ;     SS_WINDOW
  519. buffer                     ds.l    1                ; offset: $4 (4)        ;     SS_PTR
  520. wndCaps                     ds.b    1                ; offset: $8 (8)        ;     SS_FLAGS8
  521. reserved                 ds.b    1                ; offset: $9 (9)        ;     padding
  522. sockets                     ds.w    1                ; offset: $A (10)        ;     SS_SKTBITS
  523. sizeof                     EQU *                    ; size:   $C (12)
  524.                         ENDR
  525. SSPauseEDCPB            RECORD 0
  526. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  527. edc                         ds.w    1                ; offset: $2 (2)        ;     SS_EDC
  528. sizeof                     EQU *                    ; size:   $4 (4)
  529.                         ENDR
  530. SSReadEDCPB                RECORD 0
  531. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  532. edc                         ds.w    1                ; offset: $2 (2)        ;     SS_EDC
  533. value                     ds.w    1                ; offset: $4 (4)        ;     SS_WORD
  534. sizeof                     EQU *                    ; size:   $6 (6)
  535.                         ENDR
  536. SSResetSocketPB            RECORD 0
  537. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  538. socket                     ds.w    1                ; offset: $2 (2)        ;     SS_SOCKET
  539. sizeof                     EQU *                    ; size:   $4 (4)
  540.                         ENDR
  541. SSResumeEDCPB            RECORD 0
  542. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  543. edc                         ds.w    1                ; offset: $2 (2)        ;     SS_EDC
  544. sizeof                     EQU *                    ; size:   $4 (4)
  545.                         ENDR
  546. SSStartEDCPB            RECORD 0
  547. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  548. edc                         ds.w    1                ; offset: $2 (2)        ;     SS_EDC
  549. sizeof                     EQU *                    ; size:   $4 (4)
  550.                         ENDR
  551. SSStopEDCPB                RECORD 0
  552. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  553. edc                         ds.w    1                ; offset: $2 (2)        ;     SS_EDC
  554. sizeof                     EQU *                    ; size:   $4 (4)
  555.                         ENDR
  556. SSVendorSpecificPB        RECORD 0
  557. vsFunction                 ds.w    1                ; offset: $0 (0)        ;     SS_WORD
  558. adapter                     ds.w    1                ; offset: $2 (2)        ;     SS_ADAPTER
  559. socket                     ds.w    1                ; offset: $4 (4)        ;     SS_SOCKET
  560. bufferSize                 ds.w    1                ; offset: $6 (6)        ;     SS_WORD
  561. buffer                     ds.l    1                ; offset: $8 (8)        ;     SS_PTR
  562. attributes                 ds.l    1                ; offset: $C (12)        ;     SS_LONG
  563. sizeof                     EQU *                    ; size:   $10 (16)
  564.                         ENDR
  565. ;     ‘attributes’ constants 
  566.  
  567. kSSGoingToSleep                    EQU        $00000001
  568. kSSWakingFromSleep                EQU        $00000002
  569. ; ————————————————————————————————————————————————————————————————————————
  570. ;    Non-specific Socket Services Functions
  571. ;————————————————————————————————————————————————————————————————————————
  572.  
  573. ;
  574. ; pascal SS_RETCODE SSGetAdapterCount(SSGetAdapterCountPB *pb, Ptr dataPtr)
  575. ;
  576.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  577.         IMPORT_CFM_FUNCTION SSGetAdapterCount
  578.     ENDIF
  579.  
  580. ; ————————————————————————————————————————————————————————————————————————
  581. ;    Adapter Functions
  582. ;————————————————————————————————————————————————————————————————————————
  583.  
  584. ;
  585. ; pascal SS_RETCODE SSAcknowledgeInterrupt(SSAcknowledgeInterruptPB *pb, Ptr dataPtr)
  586. ;
  587.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  588.         IMPORT_CFM_FUNCTION SSAcknowledgeInterrupt
  589.     ENDIF
  590.  
  591. ;
  592. ; pascal SS_RETCODE SSGetSetPriorHandler(SSGetSetPriorHandlerPB *pb, Ptr dataPtr)
  593. ;
  594.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  595.         IMPORT_CFM_FUNCTION SSGetSetPriorHandler
  596.     ENDIF
  597.  
  598. ;
  599. ; pascal SS_RETCODE SSGetSetSSAddr(SSGetSetSSAddrPB *pb, Ptr dataPtr)
  600. ;
  601.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  602.         IMPORT_CFM_FUNCTION SSGetSetSSAddr
  603.     ENDIF
  604.  
  605. ;
  606. ; pascal SS_RETCODE SSGetAccessOffsets(SSGetAccessOffsetsPB *pb, Ptr dataPtr)
  607. ;
  608.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  609.         IMPORT_CFM_FUNCTION SSGetAccessOffsets
  610.     ENDIF
  611.  
  612. ;
  613. ; pascal SS_RETCODE SSGetAdapter(SSGetSetAdapterPB *pb, Ptr dataPtr)
  614. ;
  615.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  616.         IMPORT_CFM_FUNCTION SSGetAdapter
  617.     ENDIF
  618.  
  619. ;
  620. ; pascal SS_RETCODE SSGetSSInfo(SSGetSSInfoPB *pb, Ptr dataPtr)
  621. ;
  622.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  623.         IMPORT_CFM_FUNCTION SSGetSSInfo
  624.     ENDIF
  625.  
  626. ;
  627. ; pascal SS_RETCODE SSGetVendorInfo(SSGetVendorInfoPB *pb, Ptr dataPtr)
  628. ;
  629.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  630.         IMPORT_CFM_FUNCTION SSGetVendorInfo
  631.     ENDIF
  632.  
  633. ;
  634. ; pascal SS_RETCODE SSInquireAdapter(SSInquireAdapterPB *pb, Ptr dataPtr)
  635. ;
  636.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  637.         IMPORT_CFM_FUNCTION SSInquireAdapter
  638.     ENDIF
  639.  
  640. ;
  641. ; pascal SS_RETCODE SSSetAdapter(SSGetSetAdapterPB *pb, Ptr dataPtr)
  642. ;
  643.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  644.         IMPORT_CFM_FUNCTION SSSetAdapter
  645.     ENDIF
  646.  
  647. ;
  648. ; pascal SS_RETCODE SSVendorSpecific(SSVendorSpecificPB *pb, Ptr dataPtr)
  649. ;
  650.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  651.         IMPORT_CFM_FUNCTION SSVendorSpecific
  652.     ENDIF
  653.  
  654. ; ————————————————————————————————————————————————————————————————————————
  655. ;    Socket Functions
  656. ;————————————————————————————————————————————————————————————————————————
  657.  
  658. ;
  659. ; pascal SS_RETCODE SSGetSocket(SSGetSetSocketPB *pb, Ptr dataPtr)
  660. ;
  661.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  662.         IMPORT_CFM_FUNCTION SSGetSocket
  663.     ENDIF
  664.  
  665. ;
  666. ; pascal SS_RETCODE SSGetStatus(SSGetStatusPB *pb, Ptr dataPtr)
  667. ;
  668.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  669.         IMPORT_CFM_FUNCTION SSGetStatus
  670.     ENDIF
  671.  
  672. ;
  673. ; pascal SS_RETCODE SSInquireSocket(SSInquireSocketPB *pb, Ptr dataPtr)
  674. ;
  675.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  676.         IMPORT_CFM_FUNCTION SSInquireSocket
  677.     ENDIF
  678.  
  679. ;
  680. ; pascal SS_RETCODE SSResetSocket(SSResetSocketPB *pb, Ptr dataPtr)
  681. ;
  682.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  683.         IMPORT_CFM_FUNCTION SSResetSocket
  684.     ENDIF
  685.  
  686. ;
  687. ; pascal SS_RETCODE SSSetSocket(SSGetSetSocketPB *pb, Ptr dataPtr)
  688. ;
  689.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  690.         IMPORT_CFM_FUNCTION SSSetSocket
  691.     ENDIF
  692.  
  693. ; ————————————————————————————————————————————————————————————————————————
  694. ;    Window Functions
  695. ;————————————————————————————————————————————————————————————————————————
  696.  
  697. ;
  698. ; pascal SS_RETCODE SSGetPage(SSGetSetPagePB *pb, Ptr dataPtr)
  699. ;
  700.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  701.         IMPORT_CFM_FUNCTION SSGetPage
  702.     ENDIF
  703.  
  704. ;
  705. ; pascal SS_RETCODE SSGetWindow(SSGetSetWindowPB *pb, Ptr dataPtr)
  706. ;
  707.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  708.         IMPORT_CFM_FUNCTION SSGetWindow
  709.     ENDIF
  710.  
  711. ;
  712. ; pascal SS_RETCODE SSInquireWindow(SSInquireWindowPB *pb, Ptr dataPtr)
  713. ;
  714.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  715.         IMPORT_CFM_FUNCTION SSInquireWindow
  716.     ENDIF
  717.  
  718. ;
  719. ; pascal SS_RETCODE SSSetPage(SSGetSetPagePB *pb, Ptr dataPtr)
  720. ;
  721.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  722.         IMPORT_CFM_FUNCTION SSSetPage
  723.     ENDIF
  724.  
  725. ;
  726. ; pascal SS_RETCODE SSSetWindow(SSGetSetWindowPB *pb, Ptr dataPtr)
  727. ;
  728.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  729.         IMPORT_CFM_FUNCTION SSSetWindow
  730.     ENDIF
  731.  
  732. ; ————————————————————————————————————————————————————————————————————————
  733. ;    Error Detection Functions
  734. ;————————————————————————————————————————————————————————————————————————
  735.  
  736. ;
  737. ; pascal SS_RETCODE SSGetEDC(SSGetSetEDCPB *pb, Ptr dataPtr)
  738. ;
  739.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  740.         IMPORT_CFM_FUNCTION SSGetEDC
  741.     ENDIF
  742.  
  743. ;
  744. ; pascal SS_RETCODE SSInquireEDC(SSInquireEDCPB *pb, Ptr dataPtr)
  745. ;
  746.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  747.         IMPORT_CFM_FUNCTION SSInquireEDC
  748.     ENDIF
  749.  
  750. ;
  751. ; pascal SS_RETCODE SSPauseEDC(SSPauseEDCPB *pb, Ptr dataPtr)
  752. ;
  753.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  754.         IMPORT_CFM_FUNCTION SSPauseEDC
  755.     ENDIF
  756.  
  757. ;
  758. ; pascal SS_RETCODE SSReadEDC(SSReadEDCPB *pb, Ptr dataPtr)
  759. ;
  760.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  761.         IMPORT_CFM_FUNCTION SSReadEDC
  762.     ENDIF
  763.  
  764. ;
  765. ; pascal SS_RETCODE SSResumeEDC(SSResumeEDCPB *pb, Ptr dataPtr)
  766. ;
  767.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  768.         IMPORT_CFM_FUNCTION SSResumeEDC
  769.     ENDIF
  770.  
  771. ;
  772. ; pascal SS_RETCODE SSSetEDC(SSGetSetEDCPB *pb, Ptr dataPtr)
  773. ;
  774.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  775.         IMPORT_CFM_FUNCTION SSSetEDC
  776.     ENDIF
  777.  
  778. ;
  779. ; pascal SS_RETCODE SSStartEDC(SSStartEDCPB *pb, Ptr dataPtr)
  780. ;
  781.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  782.         IMPORT_CFM_FUNCTION SSStartEDC
  783.     ENDIF
  784.  
  785. ;
  786. ; pascal SS_RETCODE SSStopEDC(SSStopEDCPB *pb, Ptr dataPtr)
  787. ;
  788.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  789.         IMPORT_CFM_FUNCTION SSStopEDC
  790.     ENDIF
  791.  
  792.  
  793.     ENDIF ; __SOCKETSERVICES__ 
  794.  
  795.